package com.dropgame.screens;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.dropgame.main.AssetLoader;
import com.dropgame.main.DropGame;
import com.dropgame.tools.InvertedInput;
import com.dropgame.tools.TransitionEffect;

public class HelpScreen implements Screen{

	DropGame game;
	OrthographicCamera guiCam;
	Texture joe;
	TextureRegion gameBackGround;
	SpriteBatch batcher;
	InvertedInput input;
	TransitionEffect transitionEffect;
	
	public HelpScreen(DropGame game){
		this.game = game;
        guiCam = new OrthographicCamera(320, 480);		
		guiCam.position.set(320 / 2, 480 / 2, 0);
		joe = AssetLoader.joe;
		batcher = new SpriteBatch();
		transitionEffect = new TransitionEffect(game);
		input = new InvertedInput();
	}
	
	@Override
	public void dispose() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void hide() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void pause() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void render(float deltaTime) {
		Gdx.gl.glClearColor(0, 0, 0, 1);
		Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
		batcher.begin();
		batcher.draw(joe, 320/2, 480/2);
		batcher.end();
		transitionEffect.movingScreen(batcher, deltaTime);	
		
		if(input.isTouched()){
			transitionEffect.nextScreen(new GameScreen(game, 1));
		}
	}

	@Override
	public void resize(int arg0, int arg1) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void resume() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void show() {
		// TODO Auto-generated method stub
		
	}

}
